<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑采购单</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script src="js/jquery1.7.js" type="text/javascript"></script>
<script src="js/oWin.js" type="text/javascript"></script>
<script type="text/javascript">   
          
         function removeFile(id) {   
            var tr=id.parentNode.parentNode;  
            var tbody=tr.parentNode;  
            tbody.removeChild(tr);  
         }   
         function addFile()   
         {   
            var newTr = document.getElementById("spectrogramTable").insertRow(-1);  
            //added new cell  
            var numTd = newTr.insertCell(-1);  
            var proNumTd = newTr.insertCell(-1);  
            var proNameTd = newTr.insertCell(-1);  
            var proSpecTd = newTr.insertCell(-1);  
            var amountTd = newTr.insertCell(-1);  
			var priceTd = newTr.insertCell(-1);
			var countTd = newTr.insertCell(-1);  
			var stockTd = newTr.insertCell(-1);
			var doTd = newTr.insertCell(-1);
            //settilng content  
            numTd.innerText = document.getElementById('spectrogramTable').rows.length-1;  
            proNumTd.innerText = "SHBM03";  
            proNameTd.innerText = "青椒";  
            proSpecTd.innerText = "斤";  
            amountTd.innerText = "<input type="text" style="text-align:right;" value="100"/>";  
			priceTd.innerText = "<input type="text" style="text-align:right;" value="0.80"/>";  
			countTd.innerText = "80.00";   
			stockTd.innerText = "50";  
            doTd.innerHTML = "<a onclick=\"addFile()\">新增</a>/<a onclick=\"removeFile(this)\">删除</a>";  
         }   
  
    </script>   
	
	               
</head>

<body>
<br/>
<div class="top_box">
    <div style="width:100%;" class="tbox01 boxcenter">
	
	
    <div class="tbox02">
		<dl>
		  <dt>新增/编辑采购单</dt>
		  <dd>
			<div class="tbox02menu">
			  <ul>
				<li><a href="#">取消</a></li>
				<li><a href="#">确定</a></li>
			  </ul>
			</div>
		  </dd>
		</dl>
	</div>
  
	
      <div class="tbox03">
        <div class="tbox04a tbox04b">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="47%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr align="left" valign="top">
                  <td width="43"><img src="images/op5_1.gif" alt="" /></td>
                  <td width="126" class="ybox08td2"><ul>
                    采购单信息
                  </ul></td>
                  <td width="798" class="ybox08td3"></td>
                  <td width="9"><img src="images/op5_4.gif" alt="" /></td>
                </tr>
              </table>
                <div class="ybox08div">
                  <div class="ybox05 margb8">
                    <dl>
                      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:8px; margin-bottom:8px; margin-left:8px;">
                        <tr>
						 <td width="10%" align="right">所在区域：</td>
                          <td width="10%" style=" padding-right:15px;">
						    <select name="select" id="select"  style="  width:114%;">
                            <option value="所在区域">所在区域</option>
							<option value="北京" selected>北京</option>
							<option value="上海">上海</option>
                          </select></td>
                          <td width="10%" height="25" align="right" >广场名称：</td>
                          <td width="10%">
						  <input name="textfield12" type="text"  class="black12" id="textfield12" value="北京石景山广场" disabled/>
						  </td>
                          <td width="10%" align="right">广场编号：</td>
                          <td width="10%">
						  <input name="textfield2" type="text"  class="black12" id="textfield2" value="BJ01" disabled />
						  </td>
                          
                        </tr>
						<tr>
                          <td width="10%" height="25" align="right" style=" padding-right:5px;">采购单号：</td>
                          <td width="10%">
						  <input name="textfield12" type="text"  class="black12" id="textfield11" value="WD20130701001" disabled/>
						  </td>
                         
                          <td width="10%" align="right">订单日期：</td>
                          <td width="10%">
						  <input name="textfield2" type="text"  class="black12" id="textfield12" value="2013-07-01" readonly/>
						  </td>
                          <td width="10%" align="right">供货商：</td>
                          <td width="10%">
						   <input name="textfield2" type="text"  class="black12" id="textfield2" value="山村果园" disabled />
						  </td>
						 
                        </tr>
						<tr>
                          <td width="10%" height="25" align="right" style=" padding-right:5px;">订单总金额：</td>
                          <td width="10%">
						  <input name="textfield12" type="text"  class="black12" id="textfield11" value="1890.00" />
						  </td>
                          <td width="10%" align="right">描述：</td>
                          <td width="10%" >
						  <input name="textfield2" type="text"  class="black12" id="textfield12" value="餐厅20130701订货" disabled/>
						  </td>
                          <td width="10%" align="right">类型：</td>
                          <td width="10%">
						  <select name="select" id="select" style="width:100%;">
							<option value="沃尔玛" >根据周菜单生成</option>
							<option value="山村果园" >无菜单计划生成</option>
                          </select>
						  </td>
                          <td width="94">&nbsp;</td>
                          <td width="82">&nbsp;</td>
                        </tr>
                      </table>
                    </dl>
                  </div>
              
        <div class="tbox04a">

		  
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="47%" valign="top"> 
                 
                 
                  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="ybox06table" id="spectrogramTable">
                    <tr>
					  <td class="ybox06td01">序号</td>
					  <td width="144" class="ybox06td01">商品代码</td>
                      <td width="144" class="ybox06td01">商品名称</td>
                      <td width="197" class="ybox06td01">规格/单位</td>
                      <td width="156" class="ybox06td01">数量</td>
					  <td width="156" class="ybox06td01">单价</td>
					  <td width="156" class="ybox06td01">金额</td>
					  <td width="156" class="ybox06td01">当前库存</td>
					  <td width="156" class="ybox06td01">操作</td>
                    </tr>
                    <tr>
					  <td class="ybox06td02wcenter">1</td>
					  <td class="ybox06td02wcenter">SHBM03</td>
                      <td class="ybox06td02wcenter">青椒</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="0.80"/></td>
					  <td class="ybox06td02wright">80.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="addFile()">新增</a>/<a href="removeFile(id)">删除</a></td>
                    </tr>
                    <tr>
					  <td class="ybox06td02wcenter">2</td>
					  <td class="ybox06td02wcenter">SHWM01</td>
                      <td class="ybox06td02wcenter">苦瓜</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="1.10"/></td>
					  <td class="ybox06td02wright">110.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>
					<tr>
					  <td class="ybox06td02wcenter">3</td>
					  <td class="ybox06td02wcenter">BJSM02</td>
                      <td class="ybox06td02wcenter">鸡蛋</td>
                      <td class="ybox06td02wleft">个</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="2.60"/></td>
					  <td class="ybox06td02wright">520.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>
					<tr>
					  <td class="ybox06td02wcenter">4</td>
					  <td class="ybox06td02wcenter">SHBM01</td>
                      <td class="ybox06td02wcenter">猪肉</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="11.80"/></td>
					  <td class="ybox06td02wright">1180.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>  
					<tr>
					  <td class="ybox06td02wcenter">5</td>
					  <td class="ybox06td02wcenter">SHBM01</td>
                      <td class="ybox06td02wcenter">猪肉</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="11.80"/></td>
					  <td class="ybox06td02wright">1180.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>
					<tr>
					  <td class="ybox06td02wcenter">6</td>
					  <td class="ybox06td02wcenter">SHBM01</td>
                      <td class="ybox06td02wcenter">猪肉</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="11.80"/></td>
					  <td class="ybox06td02wright">1180.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>
					<tr>
					  <td class="ybox06td02wcenter">7</td>
					  <td class="ybox06td02wcenter">SHBM01</td>
                      <td class="ybox06td02wcenter">猪肉</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="11.80"/></td>
					  <td class="ybox06td02wright">1180.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>
					<tr>
					  <td class="ybox06td02wcenter">8</td>
					  <td class="ybox06td02wcenter">SHBM01</td>
                      <td class="ybox06td02wcenter">猪肉</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="11.80"/></td>
					  <td class="ybox06td02wright">1180.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>
					<tr>
					  <td class="ybox06td02wcenter">9</td>
					  <td class="ybox06td02wcenter">SHBM01</td>
                      <td class="ybox06td02wcenter">猪肉</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="11.80"/></td>
					  <td class="ybox06td02wright">1180.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>
					<tr>
					  <td class="ybox06td02wcenter">10</td>
					  <td class="ybox06td02wcenter">SHBM01</td>
                      <td class="ybox06td02wcenter">猪肉</td>
                      <td class="ybox06td02wleft">斤</td>
					  <td class="ybox06td02wcenter"><input type="text" style="text-align:right;" value="100"/></td>
					  <td class="ybox06td02wright"><input type="text" style="text-align:right;" value="11.80"/></td>
					  <td class="ybox06td02wright">1180.00</td>
					  <td class="ybox06td02wright">50</td>
					  <td class="ybox06td02wcenter"><a href="#">新增</a>/<a href="#">删除</a></td>
                    </tr>
				   </table>
                  </td>
            </tr>
          </table>
		  </div></td>
            </tr>
          </table>
        </div>
        </div>
      </div>
    </div>
</div>

</body>
</html>
